<template>
    <div class="container">
		<div class="bg"></div>
        <div class="login">
			<div class="title"><span @click="toLogin">欢迎登录</span> <span style="color: #666;" @click="toEmailLogin">邮箱登录</span></div>
			<div class="sub-title">还没有账号，
				<span class="agreement" @click="toRegister">立即注册</span>
				<span class="agreement" @click="toEmailRegister">邮箱注册</span>
			</div>
            <div class="main">
                <div class="warp">
                    <div class="input"><input type="text" placeholder="输入手机号" v-model="formData.phone"/></div>
                </div>
                <div class="warp" style="margin-bottom: 0;">
                    <div class="input">
                        <input type="text" password="true" placeholder="输入密码"  v-model="formData.password"/>
                        <!-- <div class="get-code" v-if="num == 60" @click="getCode">{{getTxt}}
                        </div>
                        <div class="get-code" v-if="num !== 60">{{ num }}</div> -->
                    </div>
                </div>
            </div>
			<div class="bottom">
				<!-- <span @click="toOtherLogin">游客进入</span> -->
				<span @click="toReset">忘记密码</span>
			</div>
			<div class="submit-btn" @click="submitForm">登录</div>
			<div class="radio-content">
				<Radio :isChecked="agree" @click.native="handlerChoose()"></Radio>  <span>已阅读同意</span><span class="agreement" @click="toUserAgreement">《留今登录&注册协议》</span>和<span class="agreement"  @click="privacyAgreement">《留今隐私政策》</span>
			</div>
        </div>
		
    </div>
</template>

<script>
    import data from '@/js/publics/login/data.js';
    import methods from '@/js/publics/login/methods.js';
    import {mapState} from 'vuex';
    import navigationBar from '../../components/navigationBar.vue';
    import btn1 from '@/components/btn1.vue'
	import Radio from '@/components/radio.vue';
    export default {
        data,
        methods,
        onLoad() {
			// uni.getProvider({
			// 	service: 'oauth',
			// 	success: res => {
			// 		console.log('oauth: ', JSON.stringify(res))
			// 		if (res.provider) {
			// 			let provider = res.provider
			// 			this.provider = provider
			// 		}
			// 	}
			// })
					
        },
        onShow() {
			this.loading = false
			
            
        },
        onHide() {
            console.log('on hide')
        },
        onUnload() {
 
        },
        computed: {
            ...mapState([
                'navigationBarHeight'
            ])
        },
        components: {
            navigationBar,
            btn1,
			Radio
        }
    };
</script>
<style>
   page{
   	background-color: #FFFFFF;
   }
  /* uni-page{
   	background-color: #FFFFFF;
   } */
</style>
<style scoped lang="scss">
    @import '~@/style/publics/login.scss';

    .on {
        color: #999999 !important;
    }
</style>
